<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<c:forEach items="${classList}" var="goods" varStatus="status">
	<c:if test="${status.index =='0' }">
		<div class="food three clearfix">
			<div class="name">
				${goods.name}
				<p class="r">
					<c:forEach items="${goods.children}" var="goods" varStatus="status">
				 		<%-- <c:if test="${status.index <3 }"> --%>
							<a href="<%=request.getParameter("ctx")%>/goodsClass/queryGoodsClassList?classId=${goods.id}" target="_blank">${goods.name}</a>
						<%-- </c:if> --%>
					</c:forEach>
				</p>
			</div>
			<img src="<%=request.getParameter("ctx")%>/images/food01.png" alt="" />
			<ul>			
				<c:forEach items="${goodsListExt}" var="goodsA" varStatus="statusA">
					<c:if test="${statusA.index=='0'}">
						<c:forEach items="${goodsA}" var="goods" varStatus="status">
							<c:if test="${status.index+1<9}">
								<li>
									<a href="<%=request.getParameter("ctx")%>/goods/queryGoodsDetail?id=${goods.id}" target="_blank" >
										<c:choose>	
											<c:when test="${goods.picture!=null }">
												<img src="<%=request.getParameter("baseFile")%>${goods.picture}" alt="枕头" />
											</c:when>
											<c:otherwise>
												<img src="<%=request.getParameter("ctx")%>/images/hot04.png" alt="枕头" />
											</c:otherwise>
										</c:choose>	
										<div>
											<p class="desc">${goods.name}</p>
												<c:if test="${goods.proTitle!='' }">
									            <p class="sales">${goods.proTitle}</p>
								           	</c:if>
								        <p class="price">
										     ¥${goods.marketPrice }
											<span class="r" style="color:#333;font-size:14px">月销${goods.monthSaleMount}笔</span>
									    </p>
									</div>
									</a>
								</li>
							</c:if>
						</c:forEach>
					</c:if>
				</c:forEach>
			</ul>
		</div>
	</c:if>
	<c:if test="${status.index =='1' }">
		<div class="cloth three clearfix">
			<div class="name">
				${goods.name}
				<p class="r">
					<c:forEach items="${goods.children}" var="goods" varStatus="status">
							<a href="<%=request.getParameter("ctx")%>/goodsClass/queryGoodsClassList?classId=${goods.id}" target="_blank">${goods.name}</a>
					</c:forEach>
				</p>
			</div>
			<img src="<%=request.getParameter("ctx")%>/images/life01.png" alt="" />
			<ul>
				<c:forEach items="${goodsListExt}" var="goodsA" varStatus="statusA">
						<c:if test="${statusA.index=='1'}">
							<c:forEach items="${goodsA}" var="goods" varStatus="status">
								<c:if test="${status.index+1<9}">
									<li>
										<a href="<%=request.getParameter("ctx")%>/goods/queryGoodsDetail?id=${goods.id}" target="_blank" >
											<c:choose>	
												<c:when test="${goods.picture!=null }">
													<img src="<%=request.getParameter("baseFile")%>${goods.picture}" alt="枕头" />
												</c:when>
												<c:otherwise>
													<img src="<%=request.getParameter("ctx")%>/images/hot04.png" alt="枕头" />
												</c:otherwise>
											</c:choose>
											<div>
												<p class="desc">${goods.name}</p>
													<c:if test="${goods.proTitle!='' }">
										            <p class="sales">${goods.proTitle}</p>
									           	</c:if>
									           	<p class="price">
													¥${goods.marketPrice }
												<span class="r" style="color:#333;font-size:14px">月销${goods.monthSaleMount}笔</span>
												</p>
											</div>
										</a>
									</li>
								</c:if>
							</c:forEach>
						</c:if>
				</c:forEach>
			</ul>
		</div>
	</c:if>
	<c:if test="${status.index =='2' }">
		<div class="cloth three clearfix">
			<div class="name">
				${goods.name}
				<p class="r">
					<c:forEach items="${goods.children}" var="goods" varStatus="status">
							<a href="<%=request.getParameter("ctx")%>/goodsClass/queryGoodsClassList?classId=${goods.id}" target="_blank">${goods.name}</a>
					</c:forEach>
				</p>
			</div>
			<img src="<%=request.getParameter("ctx")%>/images/bag.png" alt="" />
			<ul>
				<c:forEach items="${goodsListExt}" var="goodsA" varStatus="statusA">
						<c:if test="${statusA.index=='2'}">
							<c:forEach items="${goodsA}" var="goods" varStatus="status">
								<c:if test="${status.index+1<9}">
									<li>
										<a href="<%=request.getParameter("ctx")%>/goods/queryGoodsDetail?id=${goods.id}" target="_blank" >
											<c:choose>	
												<c:when test="${goods.picture!=null }">
													<img src="<%=request.getParameter("baseFile")%>${goods.picture}" alt="枕头" />
												</c:when>
												<c:otherwise>
													<img src="<%=request.getParameter("ctx")%>/images/hot04.png" alt="枕头" />
												</c:otherwise>
											</c:choose>	
										  <div>
										         <p class="desc">${goods.name}</p>
													<c:if test="${goods.proTitle!='' }">
										            <p class="sales">${goods.proTitle}</p>
									           	</c:if>
									         <p class="price">
													¥${goods.marketPrice }
												<span class="r" style="color:#333;font-size:14px">月销${goods.monthSaleMount}笔</span>
												</p>
											</div>
										</a>
									</li>
								</c:if>
							</c:forEach>
						</c:if>
				</c:forEach>
			</ul>
		</div>
	</c:if>
</c:forEach>